package com.online_video.entity;

import java.util.List;

public class Page <T>{

    public static final Integer DEFAULT_PAGE_SIZE = 5;   //默认每页展示数量
    public T setPageNo;
    //当前页码
    private  Integer pageNo;
    //总页码
    private Integer pageTital;
    //当前页显示数量
    private Integer pageSize = DEFAULT_PAGE_SIZE;
    // 总记录数
    private Integer pageTotalCount;
    //当前页数据
    private List<T> items;

    public Page(T setPageNo, Integer pageNo, Integer pageTital, Integer pageSize, Integer pagfeTotalCount, List<T> items) {
        this.setPageNo = setPageNo;
        this.pageNo = pageNo;
        this.pageTital = pageTital;
        this.pageSize = pageSize;
        this.pageTotalCount = pagfeTotalCount;
        this.items = items;
    }

    public Page() {
    }

    @Override
    public String toString() {
        return "Page{" +
                "setPageNo=" + setPageNo +
                ", pageNo=" + pageNo +
                ", pageTital=" + pageTital +
                ", pageSize=" + pageSize +
                ", pagfeTotalCount=" + pageTotalCount +
                ", items=" + items +
                '}';
    }

    public static Integer getDefaultPageSize() {
        return DEFAULT_PAGE_SIZE;
    }

    public T getSetPageNo() {
        return setPageNo;
    }

    public void setSetPageNo(T setPageNo) {
        this.setPageNo = setPageNo;
    }

    public Integer getPageNo() {
        return pageNo;
    }

    public void setPageNo(Integer pageNo) {
        this.pageNo = pageNo;
    }

    public Integer getPageTital() {
        return pageTital;
    }

    public void setPageTital(Integer pageTital) {
        this.pageTital = pageTital;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getPageTotalCount() {
        return pageTotalCount;
    }

    public void setPageTotalCount(Integer pageTotalCount) {
        this.pageTotalCount = pageTotalCount;
    }

    public List<T> getItems() {
        return items;
    }

    public void setItems(List<T> items) {
        this.items = items;
    }
}
